{% extends "base.html" %}

{% block content %}



<script language=javascript>

function verify(form){
  if(form.firstname.value==""){
	alert("Enter the firstname please!");
	form.firstname.focus();		
       return false;
	}
  if(form.lastname.value==""){
	alert("Enter the lastname please!");
	form.lastname.focus();		
       return false;
	}
  if(form.tel_h.value !=""||form.tel_o.value !=""||form.tel_m.value !=""){

	}
	else{
		alert("Enter tel please");
       return false;
	  }
	 if(form.email.value==0){
	alert("Enter email please");
	form.email.focus();		
       return false;
	}
// if(form.address.value==""){
//	alert("Enter Address please");
//	form.address.focus();		
//       return false;
//	}

return true;
 }

</script>

<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td align="center">
<form name='form1' id='form1' action="/saveuser/" method='post' onsubmit='return verify(this);'>
<table width='650' class='grid' cellspacing='1' align='center'><tr><td colspan='2' class='title'>New Inquiry</td></tr>
<tr valign='middle' align='left'></tr>

<tr valign='middle' align='left'><td class='odd' width='25%'><font color="red">*</font>First Name:</td>
<td class='even'><input type="text" name="firstname" />&nbsp;Last Name:
<input type="text" name="lastname" /></td></tr>
<tr valign='middle' align='left'><td class='odd' width='25%'>Job Title:</td>
<td class='even'><input type="text" name="job_title" /></td></tr>

<tr valign='middle' align='left'><td class='odd' width='25%'>Company:</td>
<td class='even'><input type="text" name="company" /></td></tr>
<tr valign='middle' align='left'><td class='odd' width='25%'><font color="red">*</font>Tel:</td>
<td class='even'><input type="text" name="tel_h" size="10" />(H)<input type="text" name="tel_o" size="10" />(O)<input type="text" name="tel_m" size="13" />(M)</td></tr>

<tr valign='middle' align='left'><td class='odd' width='25%'><font color="red">*</font>E-mail</td>
<td class='even'><input type="text" name="email" /></td></tr>
 <tr valign='middle' align='left'><td class='odd' width='25%'>Received email?</td>
<td class='even'><input name="received_emaill" type="checkbox" value="1" />yes</td></tr>
 <tr valign='middle' align='left'><td class='odd' width='25%'>Received hardcopy?</td>
<td class='even'><input name="received_hardcopy" type="checkbox" value="1" />yes</td></tr>
 <tr valign='middle' align='left'><td class='odd' width='25%'>Consultation with the program consultant?</td>
<td class='even'><input name="attendsess" type="checkbox" value="Y" />yes</td></tr>
<tr valign='middle' align='left'><td class='odd' width='25%'>Interest Level</td>
<td class='even'><select name="interlevel">
<option value="0">Doesn't cantact yet</option>
<option value="1"> High Interest</option>
<option value="2"> Some Interest</option>
<option value="3"> No Interest</option>
<option value="4">Consider next time</option>
</select>
</td></tr>
<!--
 <tr valign='middle' align='left'><td class='odd' width='25%'><font color='red'>(M&T)</font>Send me more info about:</td>
<td class='even'><input name="mba" type="checkbox" value="1" />mba&nbsp;<input name="mpa" type="checkbox" value="1"  />mpa&nbsp;<input name="dba" type="checkbox" value="1" />dba&nbsp;</td></tr>
-->
<tr valign='middle' align='left'><td class='odd' width='25%'><font color="red">*</font>Address</td>
<td class='even'><textarea name="address" cols="50" rows="2"></textarea></td></tr>
<tr valign='middle' align='left'><td class='odd' width='25%'>Education</td>
<td class='even'><select name="education">
<option value="">Choose Education plz</option>
<option value="1"> Secondary School</option>
<option value="2">Diploma</option>
<option value="3">Bachelor's Degree</option>
<option value="4">Master's Degree</option>
<option value="5">Ph.D.</option>
</select>
</td></tr>
<tr valign='middle' align='left'><td class='odd' width='25%'>Work Experience</td>
<td class='even'><input type="text" name="work_experience" /> &nbsp; year ( Enter a number )</td></tr>
<tr valign='middle' align='left'><td class='odd' width='25%'>Agent</td>
<td class='even'><select name="agent_id">
 <option value="1">Choose Agent plz</option>
  {% for agent in agent %}
   <option value="{{agent.id}}">{{agent.name}}</option>
  {% endfor %}
</select>
</td></tr>
<tr valign='middle' align='left'><td class='odd' width='25%'>Further Interest</td>
<td class='even'><select name="furtherinterest_id">
 <option value="0">Choose plz</option>
  {% for fi in fi %}
   <option value="{{fi.id}}">{{fi.name}}</option>
  {% endfor %}
</select>
</td></tr>
<tr valign='middle' align='left'><td class='odd' width='25%'>Programs</td>
<td class='even'><select name="projects_id" style='color:#CC33FF'>
 <option value="0">Choose plz</option>
  {% for pj in pj %}
   <option value="{{pj.id}}" {% ifequal pj.id p_id %} selected="selected" {% endifequal %}>{{pj.name}}</option>
  {% endfor %}
</select>
<!--{% if p_id %} <input type='hidden' name="projects_id" value="{{p_id}}" />{% endif %} -->
</td></tr>

{% ifequal level 'administrators' %}
<tr valign='middle' align='left'><td class='odd' width='25%'>belong to which sales</td>
<td class='even'><select name="salesperson_id">
 <option value="0">Choose plz</option>
  {% for sales in sales %}
   <option value="{{sales.id}}">{{sales.name}}</option>
  {% endfor %}
</select>
</td></tr>
<!-- user group -->
<tr valign='middle' align='left'><td class='odd' width='25%'>belong to which salesgroup</td>
<td class='even'><select name="group">
 <option value="0">Choose group</option>
  {% for sales in salesgroup %}
   <option value="{{sales.id}}">{{sales.name}}</option>
  {% endfor %}
</select>
</td></tr>
{%endifequal%}
<tr valign='middle' align='left'><td class='odd' width='25%'><font color='red'>(M&T)</font>Message</td>
<td class='even'><textarea name="message" cols="40" rows="2"></textarea></td></tr>
<input type="hidden" name="back_url" value="/ulist" />
<tr valign='middle' align='left'><td class='odd' width='25%'></td>
<td class='even'>&nbsp;<input type='submit' class='button' name='submit'  id='submit' value=' Submit '  />&nbsp;&nbsp;<input type='reset' class='button' name='reset'  id='reset' value=' Reset '  /></form></td></tr>

</table>


{% endblock %}
